package app.netant.book.xiaoshuo2016;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class XiaoShuo2016Root extends BaseRoot {
	
	public XiaoShuo2016Root(){
		this.homeUrl = "https://www.xiaoshuo2016.com/quanbu/0_lastupdate_0_0_0_0_0_0_2.html";
		this.pageUrl = "https://www.xiaoshuo2016.com/quanbu/0_lastupdate_0_0_0_0_0_0_";
		this.tableKey = "xiaoshuo2016";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+".html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new XiaoShuo2016Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new XiaoShuo2016Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new XiaoShuo2016Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		XiaoShuo2016Root root = new XiaoShuo2016Root();
		//root.analyse(30);
		root.excepCycle();
	}


	
}
